From fb581a1084ed8949c6b8c666f07a3239153c03f6 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sun, 22 Feb 2015 13:01:17 +0100 Subject: [PATCH] gdk/quartz: Fix mixup in attributes usage creating window implementation First, attributes can be NULL (which is always the case when calling gdk_window_ensure_native) so do not unconditionally dereference it. Then the window_type should be taken directly from the GdkWindow as in other backends (such as the X11 one for example). https://bugzilla.gnome.org/show_bug.cgi?id=744942 --- gdk/quartz/gdkwindow-quartz.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c index 2a2444ef74..6306034bce 100644 --- a/gdk/quartz/gdkwindow-quartz.c +++ b/gdk/quartz/gdkwindow-quartz.c @@ -818,7 +818,7 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display, impl->view = NULL; - switch (attributes->window_type) + switch (window->window_type) { case GDK_WINDOW_TOPLEVEL: case GDK_WINDOW_TEMP: @@ -846,8 +846,9 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display, window->width, window->height); - if (attributes->window_type == GDK_WINDOW_TEMP || - attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN) + if (window->window_type == GDK_WINDOW_TEMP || + ((attributes_mask & GDK_WA_TYPE_HINT) && + attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN)) { style_mask = NSBorderlessWindowMask; } -- 2.30.2